package com.google.gwt.sample.dynatablerf.client.events;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.ui.SuggestOracle.Callback;
import com.google.gwt.user.client.ui.SuggestOracle.Request;

public class GrifoSuggestEvent extends
		GwtEvent<GrifoSuggestEventHandler> {

	public static Type<GrifoSuggestEventHandler> TYPE = new Type<GrifoSuggestEventHandler>();
	
	private Request request;
	private Callback callback;

	public GrifoSuggestEvent(Request request, Callback callback) {
		super();
		this.request = request;
		this.callback = callback;
	}

	@Override
	protected void dispatch(GrifoSuggestEventHandler handler) {

		handler.onGrifoSuggest(this);
	}

	@Override
	public Type<GrifoSuggestEventHandler> getAssociatedType() {

		return TYPE;
	}

	public Request getRequest() {
		return request;
	}

	public void setRequest(Request request) {
		this.request = request;
	}

	public Callback getCallback() {
		return callback;
	}

	public void setCallback(Callback callback) {
		this.callback = callback;
	}

}
